Skip to content

RGB to YUV Performance Improvements#81

Merged
ralfbiedert merged 1 commit into
ralfbiedert:masterfrom
Charlie-Zheng:rgb_to_yuv_improvements
Sep 5, 2025
Merged

RGB to YUV Performance Improvements#81
ralfbiedert merged 1 commit into
ralfbiedert:masterfrom
Charlie-Zheng:rgb_to_yuv_improvements

Conversation

@Charlie-Zheng

Copy link
Copy Markdown
Contributor

Changed to use integer math instead of f32 method. Adjusted to use iterators instead of array indexing.

New benchmarking timings on my PC (Windows 10, AMD Ryzen 7900X)

test convert_rgb8_to_yuv_1920x1080 ... bench:     305,200.00 ns/iter (+/- 26,439.00)
test convert_rgb8_to_yuv_512x512   ... bench:      44,606.80 ns/iter (+/- 1,529.76)

Old benchmarking timings

test convert_rgb8_to_yuv_1920x1080 ... bench:   4,473,440.00 ns/iter (+/- 368,726.00)
test convert_rgb8_to_yuv_512x512   ... bench:     543,745.00 ns/iter (+/- 9,916.00)

@Charlie-Zheng Charlie-Zheng force-pushed the rgb_to_yuv_improvements branch from 7e86454 to 41a08cb Compare September 5, 2025 03:50
@Charlie-Zheng

Charlie-Zheng commented Sep 5, 2025

Copy link
Copy Markdown
Contributor Author

The build errors appear to be related to the dependencies of the crate and not due to the changed in this PR.

  Downloaded moxcms v0.7.5
error: failed to parse manifest at `/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/moxcms-0.7.5/Cargo.toml`

Caused by:
  feature `edition2024` is required

  The package requires the Cargo feature called `edition2024`, but that feature is not stabilized in this version of Cargo (1.84.1 (66221abde 2024-11-19)).
  Consider trying a newer version of Cargo (this may require the nightly release).
  See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#edition-2024 for more information about the status of this feature.
Error: Process completed with exit code 101.

@ralfbiedert

Copy link
Copy Markdown
Owner

Can you rebase and try again?

@ralfbiedert

Copy link
Copy Markdown
Owner

BTW, I can confirm a ~14x performance increase here locally, absolutely outstanding!

@Charlie-Zheng Charlie-Zheng force-pushed the rgb_to_yuv_improvements branch from 41a08cb to c363086 Compare September 5, 2025 14:25
@ralfbiedert ralfbiedert merged commit 91a60b5 into ralfbiedert:master Sep 5, 2025
15 checks passed
@ralfbiedert

Copy link
Copy Markdown
Owner

Thanks! I'll credit you in the README, let me know if I shouldn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants